package ar.edu.utn.frgp.TPFinalBanco.action;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.opensymphony.xwork2.ActionSupport;

public abstract class BaseAction extends ActionSupport{
	
	private static final long serialVersionUID = 1L;
	private String[] contexto = new String[] {"hibernate-spring.xml", 
			"daos.xml", "services.xml"};
	
	private ApplicationContext ctx;
	
	public ApplicationContext getContext(){
		if(ctx == null){
			ctx = new ClassPathXmlApplicationContext(contexto);
		}
		return ctx;
		
	}

}
